package com.mingqijia.gassafety.db.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 控制器上报数据历史
 * </p>
 *
 * @author guoliang.lao
 * @since 2023-10-12
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_record_controller_history")
@ApiModel(value="RecordControllerHistory对象", description="控制器上报数据历史")
public class RecordControllerHistory extends BaseEntity {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "来源主键id")
    @TableField("origin_id")
    private Long originId;

    @ApiModelProperty(value = "报警器设备主键")
    @TableField("device_id")
    private String deviceId;

    @ApiModelProperty(value = "客户编号")
    @TableField("consumer_id")
    private Integer consumerId;

    @ApiModelProperty(value = "记录类型 1-注册激活，2-数据上报，3-运行上报，4-监测上报，5-数据采集")
    @TableField("record_type")
    private Integer recordType;

    @ApiModelProperty(value = "控制器状态 0-正常,17-主电故障,18-备电故障,19-其他故障")
    @TableField("controller_status")
    private Integer controllerStatus;

    @ApiModelProperty(value = "工作状态 0-运行状态， 1-上电开机 ，2-设备掉电，3-备电工作")
    @TableField("work_status")
    private Integer workStatus;

    @ApiModelProperty(value = "供电类型（主电）0-市电;1-碱电;2-锂电 ")
    @TableField("power_model")
    private Integer powerModel;

    @ApiModelProperty(value = "探测器数量")
    @TableField("detector_count")
    private Integer detectorCount;

    @ApiModelProperty(value = "主电电量b百分比")
    @TableField("main_battery_value")
    private Integer mainBatteryValue;

    @ApiModelProperty(value = "通信信号强度")
    @TableField("singal")
    private Integer singal;

    @ApiModelProperty(value = "是否触发阀控 0-否，1-是，255-不涉及,（当record_type为4时此默认为255")
    @TableField("valve_triggered")
    private Integer valveTriggered;

    @ApiModelProperty(value = "报警器累计工作天数")
    @TableField("working_days")
    private Integer workingDays;

    @ApiModelProperty(value = "上报时间")
    @TableField("record_at")
    private Date recordAt;

    @ApiModelProperty(value = "企业编号")
    @TableField("sp_id")
    private String spId;

    @ApiModelProperty(value = "时钟准确度 0:较高 1:高 2:中 3:低")
    @TableField("clock_accuracy")
    private Integer clockAccuracy;
}
